﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace PayrollSystemTests.AddNewEmployee
{
    [TestClass]
    public class HourlyEmployee
    {
        [TestMethod]
        public void GivenEmployeeNotInDatabase_WhenAddingValidHourlyEmployee_ThenEmployeeShouldBeInDatabase()
        {
            var t = new AddHourlyEmployee(1, "Bob", "Home", 1000);
            t.Execute();

            Employee e = PayrollDatabase.GetEmployee(1);
            Assert.AreEqual("Bob" , e.Name);

            PaymentClassification pc = e.Classification;
            Assert.IsTrue(pc is HourlyClassification);
        }
    }
}
